﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/TwoCol.Master" AutoEventWireup="true" CodeBehind="Detail.aspx.cs" Inherits="P.InOut.NetMvc.Views.Updates.Detail" %>
<%@ Import Namespace="P.InOut.NetMvc.Controllers" %>

<asp:Content ID="Scripts" ContentPlaceHolderID="Scripts" runat="server">
    <!-- // Place any necessary javascript here -->
    <script src="../../Scripts/jquery.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.maskedinput.js" type="text/javascript"></script>
    <script type="text/javascript">
        
        $(document).ready(function($) {
            // variable used to detect if form being edited
            var editing = false;
            $("#inStatus").bind("change", function() {
                $("#inStatusForm").submit();
            });

            $("#officeStatus").bind("change", function() {
                $("#inStatusForm").submit();
            });
        });

        $(document).unload(function($) {
            $("#inStatus").unbind();
            $("#officeStatus").unbind();
        });
        
        function editUpdate(id) {

            $("#" + id.toString()).css("display", "none");
            $("#editLink" + id.toString()).css("display", "none");
            $("#elapsed" + id.toString()).css("display", "none");
            $("#edit" + id.toString()).css("display", "inline");
            editing = true;
        }

        function cancelEdit(id) {

            $("#edit" + id.toString()).css("display", "none");
            $("#" + id.toString()).css("display", "inline");
            $("#editLink" + id.toString()).css("display", "inline");
            $("#elapsed" + id.toString()).css("display", "inline");
            editing = false;
        }
    </script>
</asp:Content>

<asp:Content ID="Header" ContentPlaceHolderID="Header" runat="server">
<!-- // Place Header 100% Width Content Here -->
</asp:Content>

<asp:Content ID="Col1" ContentPlaceHolderID="Col1" runat="server">
<!-- // Place all LeftColumn Content Here -->    
    <div id="statusform">
        <%= Html.RenderComponent<ProfileComponentController>(c => c.DetailStatus()) %>
    </div>
    <!-- // Wrap the Updates Component in a Div for easy CSS -->
    <div id="updates">
        <%= Html.RenderComponent<UpdateComponentController>(c => c.UserUpdates()) %>
    </div>
</asp:Content>

<asp:Content ID="Col2" ContentPlaceHolderID="Col2" runat="server">
<!-- // Place all RightColumn Content Here -->

    <!-- // Wrap the TeamUpdates Component in a Div for easy CSS -->
    <div id="memberUpdates">
        <%= Html.RenderComponent<UpdateComponentController>(c => c.TeamUpdates()) %>
    </div>
</asp:Content>
